#include <stdio.h>

int add_sub (int a, int b, int *add, int *sub)
{
	int x, y;

	x = a+b;
	*add = x;
	printf ("add = %d\n", *add);

	y = a-b;
	*sub = y;
	printf ("sub = %d\n", *sub);

	

	return 0;
}

int add_sub1 (int a, int b, unsigned int *add, int *sub)
{
	int x, y;
	unsigned int *x1=NULL;

	x = a+b;
	x1=&x;
	*add = (int *)&x1;
	printf ("add = %d\n", *add);

	y = a-b;
	*sub = y;
	printf ("sub = %d\n", *sub);

	

	return 0;
}

int add_sub2 (int a, int b, unsigned int *add, int *sub)
{
	int x, y;
	unsigned int *x1=NULL;

	x = a+b;
	x1=&x;
	*add = (int *)&x1;
	printf ("add = %d\n", *add);

	y = a-b;
	*sub = y;
	printf ("sub = %d\n", *sub);

	

	return 0;
}


main()
{
	int x,y,a=0,s=0;//*a=NULL,*s=NULL;
	int *a1=NULL;

	x = 10;
	y = 20;

	add_sub1 (x, y , &a, &s);
	a1=&a;
	printf ("add = %d\n", *a1);
	printf ("sub = %d\n", s);

}


void swap(int *x, int *y)
{
  int temp;
  temp = *x;
  *x = *y;
  *y = temp;
  printf("Swapped values are a = %d and b = %d\n", *x, *y);
}
void main1()
{
  int a = 7, b = 4;
  swap(&a, &b);
  printf("Original values are a = %d and b = %d\n",a,b);
  printf("The values after swap are a = %d and b = %d\n",a,b);
}